import zmq
context = zmq.Context()
socket = context.socket(zmq.REP)
socket.bind("tcp://*:5555")
pub_socket = context.socket(zmq.PUB)
pub_socket.bind("tcp://*:5556")

while True:
    #  Wait for next request from client
    message = socket.recv()
    pub_socket.send_string(f'chat:{str(message,encoding="ascii")}')
    socket.send(b'ok')